package com.yict.csms.resourceplan.dao.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.yict.common.dao.impl.BaseDao;
import com.yict.csms.resourceplan.dao.IShipPlanDao;
import com.yict.csms.resourceplan.entity.ShipPlan;

@Repository("shipPlanDao")
public class ShipPlanDaoImpl extends BaseDao<ShipPlan, Long> implements IShipPlanDao {

	public List<ShipPlan> findByShipId(Long shipId){
		List<ShipPlan> list = new ArrayList<ShipPlan>();
		String queryString ="from ShipPlan c where c.ship.shipId = :shipId";
		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("shipId",shipId);
		list = super.list(queryString, map, 0, 0);
		return list;
	}
}
